package Week3.num.week3Test1.opp02ex;

public class SalesEmployee extends ColaEmployee {
    /**
     * 销售额
     */
    private double sale;
    /**
     * 提成率
     */
    private double commission;

    public SalesEmployee() {
    }

    public SalesEmployee(String name, int birthMonth, double sale, double commission) {
        super(name, birthMonth);
        this.sale = sale;
        this.commission = commission;
    }

    public double getSale() {
        return sale;
    }

    public void setSale(double sale) {
        this.sale = sale;
    }

    public double getCommission() {
        return commission;
    }

    public void setCommission(double commission) {
        this.commission = commission;
    }

    @Override
    public double getSalary(int month) {
        super.getSalary(month);
        return salary + this.sale * this.commission;
    }
}
